<%@page import="cn.com.entity.Doctor"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>医生密码页面</title>
<style type="text/css">
#main{
	margin-top: 10%;
	color: #03C;
}
</style>
<script type="text/javascript">
function yanzheng(){
	var pwd=document.getElementById("pwd").value;
	var qrmima=document.getElementById("qrmima").value;
	var reg=/^[A-Za-z0-9]{4,25}$/; 
	if(!reg.test(pwd)){
		alert("密码只能是字母和数字，必须在4到25位之间");
		return false;
	}
	if(qrmima!=pwd||pwd==""||qrmima==""){
		alert("请确认两次输入的密码一致,并且都不能为空");
		return false;
	}
	return true;	
	
}
</script>
</head>
<body>
<div id="main">
<%
if(session.getAttribute("doctor")!=null){
if(session.getAttribute("onedoctorlist")!=null){	
Doctor	d=(Doctor)session.getAttribute("onedoctorlist");
%>
<form method="post" action="updatedoctorpwdaction" onsubmit="return yanzheng()">
<h2 align="center">修改密码</h2>
<center>${doctormsg}</center>
	<table align="center" width="30%" cellspacing="10px" style="font-size: 20px">
		<tr>
			<td>密码：</td>
			<td>
			<input type="hidden" name="doctor.doctorid" value="<%=d.getDoctorid()%>"/>
			<input type="text" name="doctor.doctorpwd" id="pwd" value="<%=d.getDoctorpwd()%>"/>
			<input type="hidden" name="doctor.doctorname" value="<%=d.getDoctorname()%>"/>
			<input type="hidden" name="doctor.doctorrealname" value="<%=d.getDoctorrealname()%>"/>
			<input type="hidden" name="doctor.doctorsex" value="<%=d.getDoctorsex()%>"/>
			<input type="hidden" name="doctor.doctorphone" value="<%=d.getDoctorphone()%>"/>
			<input type="hidden" name="doctor.doctorworktime" value="<%=d.getDoctorworktime()%>"/>
			<input type="hidden" name="doctor.doctorprofile" value="<%=d.getDoctorprofile()%>"/>
			<input type="hidden" name="doctor.doctordesignation" value="<%=d.getDoctordesignation()%>"/>
			<input type="hidden" name="doctor.departmentsid" value="<%=d.getDepartmentsid()%>"/>
			</td>
		</tr>
		<tr>
			<td>确认密码：</td>
			<td><input type="text" id="qrmima" value="" /></td>
		</tr>
		<tr>
			
			<td colspan="2"><input type="submit"  style="font-size:20px; color:#FFF; background-image: url(images/lanseanniu.jpg);" value=" 保 存 " /></td>
		</tr>
	</table>
	
</form>

<%} 
}%>
</div>
</body>
</html>